package com.itheima.service.Checkgroup.impl;

import com.itheima.entity.Checkgroup;
import com.itheima.mapper.CheckgroupMapper;
import com.itheima.service.Checkgroup.CheckgroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class CheckgroupServiceImpl implements CheckgroupService {
    @Autowired
    private CheckgroupMapper checkgroupMapper;
    @Override
    @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRED)//开启事务
    public List<Checkgroup> findAll() {
        return checkgroupMapper.findAll();
    }
}
